#define _CRT_SECURE_NO_WARNINGS 
#include <stdio.h>
#define N 20
int main()
{
	int total = N / 1;
	int leary = total;
	while (1)
	{
		total += leary / 2;
		leary = (leary % 2 == 0 ? leary / 2 : leary / 2 + 1);
		if (leary == 0 || leary == 1)
			break;
	}
	printf("%d", total);
	return 0;
}